<template>
	<view class="safety">
		<comHead :title="$t('grzx.zhaq')" :isLeft="true" :isRight="false"></comHead>
		<view class="list">
			<view class="item" @click="toChangeMobile">
				<view class="l">
					<text>{{$t('grzx.xgsjh')}}</text>
				</view>
				<view class="m">
					<text>{{this.mobile.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2')}}</text>
				</view>
				<view class="r">
					<image src="https://siha.vxmeng.com/static/index/right.png" mode="widthFix"></image>
				</view>
			</view>
<!-- 			<view class="item" @click="popFun('等风来不如追风去','修改签名','editSign')">
				<view class="l">
					<text>{{$t('grzx.czmm')}}</text>
				</view>
				<view class="m">
					<text></text>
				</view>
				<view class="r">
					<image src="https://siha.vxmeng.com/static/index/right.png" mode="widthFix"></image>
				</view>
			</view> -->
			<!-- 			<view class="item" @click="comLink('/pages/my/authentication')">
				<view class="l">
					<text>{{$t('grzx.smrz')}}</text>
				</view>
				<view class="m">
					<text>{{$t('grzx.wrz')}}</text>
				</view>
				<view class="r">
					<image src="https://siha.vxmeng.com/static/index/right.png" mode="widthFix"></image>
				</view>
			</view> -->
		</view>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				mobile: ''
			}
		},
		onLoad() {
			this.getMobile()
		},
		methods: {
			async getMobile() {
				const res = await this.$myRequest({
					url: 'api/user/index',
					method: 'GET'
				})
				if (res.code == 1) {
					this.mobile = res.data.mobile
				}
			},
			toChangeMobile() {
				if (this.mobile !== '') {
					this.comLink('/pages/my/changePhone')
				} else {
					this.comLink('/pages/my/changePhone2')
				}
			}
		}
	}
</script>

<style lang="less" scoped>
	.safety {
		height: 100vh;


		.list {
			box-sizing: border-box;

			.item {
				padding: 30rpx;
				box-sizing: border-box;
				display: flex;
				justify-content: space-between;
				align-items: center;

				.l {
					color: #fff;
					font-size: 32rpx;
				}

				.m {
					display: flex;
					justify-content: flex-end;
					width: 70%;

					text {
						color: #fff;
						font-size: 30rpx;
					}
				}

				.r {
					image {
						width: 30rpx;
					}
				}
			}
		}
	}
</style>